$(function ($) {
		$(document).ready(function(){
					// writeBody();
					init();
		});

	    var base_url="http://admin.51ski.com";
		function file_submit(){
			var url=base_url+"/api/file/upload.do?userId="+getCookie("userId")+"&callback=http://www.51ski.com/moredo/index.html";
			$("#file_upload_form").attr("action", url);
			$("#file_upload_form").submit();
               
             
		}

		function init(){
			$("#file_upload_button").on('click', function () {
				file_submit();
			});
		}

});